﻿<%@ Page Title="原料分类指派" Language="C#" MasterPageFile="~/Site.Master" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="RawMaterialManage.aspx.cs" Inherits="StoragePeriod.Web.SysManage.RawMaterialManage" %>
<%@ Register src="UC_Menu.ascx" tagname="UC_Menu" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
    .layout{ background:url(../images/images_59.jpg) no-repeat;}
    .left-cloumn{display:none;}
    .right-cloumn{width:944px;}
    #sms_title_li_0{ background:url(../images/images_55.jpg) no-repeat;}
    .Left_Search{width:190px;padding-left:10px; height:30px;border-top:1px solid #ccc;}
    .right_Stafflist{ overflow:auto;}
</style>
<script type="text/javascript">
    $(document).ready(function () {
        $("#MainContent_tvRawView input[type='checkbox']").live("click", function () {
            if ($(this).attr("checked")) {
                $(this).parents("table").next("div").find("input[type='checkbox']").attr("checked", true);
            }
            else {
                $(this).parents("table").next("div").find("input[type='checkbox']").attr("checked", false);
            }
        });

        $("#MainContent_tvNewRawView input[type='checkbox']").live("click", function () {
            if ($(this).attr("checked")) {
                $(this).parents("table").next("div").find("input[type='checkbox']").attr("checked", true);
            }
            else {
                $(this).parents("table").next("div").find("input[type='checkbox']").attr("checked", false);
            }
        });

        $("#MainContent_Drop_RawType").live("change", function () {
            sp.ajax.call("Common", { FunType: "RawType", ParentId: $("#MainContent_Drop_RawType").val() }, function (res) {
                $("#MainContent_Drop_RawTypeInfo").html($("#selectTmpl").tmpl(res.Data));
            }, null, true)
        });
    });

    function SetRawTypeInfo() {
        $("#MainContent_HidSelectTypeid").val($("#MainContent_Drop_RawTypeInfo").val());
    }
    
    function alertstr(str) {
        alert(str);
    }
</script>
<script id="selectTmpl" type="text/x-jquery-tmpl">
   <option value="${Value}">${Text}</option>
</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainLeft" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<asp:UpdatePanel ID="upPanelMain" runat="server">
<ContentTemplate>
<asp:HiddenField ID="HidSelectTypeid" runat="server" Value="" />
<div class="sms_title">
    <ul>
        <li><a href="OperationManage.aspx" style="color:#f90;">基础设置</a></li>
        <li><a href="PrivilegeManage.aspx">权限管理</a></li>
        <li><a href="PersonnelManage.aspx">人员管理</a></li>
    </ul>
</div>
<div class="sms_main">
    <div class="BasicData_left">
        <h2>基础数据管理</h2>
        <uc1:UC_Menu ID="UC_Menu1" runat="server" ShowId=6 />
    </div>
    
    <div class="BasicData_right">
        <div class="BasicData_MainLeft">
            <h2>未设置的原料</h2>
            <asp:TreeView ID="tvRawView" runat="server" Height="389px" Width="220px" 
                style=" overflow:auto;" SkipLinkText="">
            </asp:TreeView>
        </div>
        <div class="BasicData_MainCenter">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td width="75" align="right">原料大类：</td>
                    <td align="left"><asp:DropDownList ID="Drop_RawType" runat="server" Width="100"></asp:DropDownList></td>
                </tr>
                <tr>
                    <td align="right">原料细类：</td>
                    <td align="left"><asp:DropDownList ID="Drop_RawTypeInfo" runat="server" Width="100"></asp:DropDownList></td>
                </tr>
                <tr>
                    <td colspan="2" style="padding-top:10px;"><asp:Button ID="Btn_SetType" OnClientClick="SetRawTypeInfo()" runat="server" Text="设置分类" CssClass="btn_1" onclick="Btn_SetType_Click"/></td>
                </tr>
                <tr>
                    <td colspan="2"><asp:Button ID="Btn_ClearType" runat="server" Text="取消分类" CssClass="btn_1" style="margin-top:10px;" onclick="Btn_ClearType_Click" /></td>
                </tr>
            </table>
        </div>
        <div class="BasicData_MainRight">
            <h2>已设置的原料分类</h2>
            <asp:TreeView ID="tvNewRawView" runat="server" Height="389px" Width="220px" style=" overflow:auto;" SkipLinkText="">
            </asp:TreeView>
        </div>

    </div>

</div>
<div class="sms_foot">
<asp:HiddenField ID="hdRoleCode" runat="server" />
    <img src="../images/images_58.jpg" width="944" height="8" class="float_left" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>